package pl.ydp.components.mathcell.mathrecognizer.geometry.extractor
{
	import pl.ydp.components.mathcell.mathrecognizer.engine.Parameters;
	
	public class PrimitiveLoopSubstance extends PrimitiveSubstance
	{
		public function PrimitiveLoopSubstance(_beginIndex:Number, _generalType:Number, _curveType:Number=0, _endIndex:Number = -1, _helixity:Number = -1, _closureDistance:Number = Infinity)
		{
			super(_beginIndex, _generalType, _curveType, _endIndex, _helixity);
			
			closureDistance = _closureDistance;
		}
		
		public var closureDistance:Number;
		
		public var closureDistanceRelative:Number;
		public var lengthRelative:Number;

		
		public function findFeaturesRelative(_closureDistance:Number):void{
			
			closureDistance = _closureDistance;
			closureDistanceRelative = 1 - closureDistance / Parameters.LOOP_MAX_CLOSURE_DISTANCE; 
			
			lengthRelative = Parameters.LOOP_MIN_LENGTH / length;
		
		}
	}	
}